//
//  HUDDemoViewController.swift
//  ZZUIDemo
//
//  Created by 张文晏 on 2018/11/20.
//  Copyright © 2018 Newcoretech. All rights reserved.
//

import UIKit
import ZZUI

class HUDDemoViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "hide all", style: .plain, target: self, action: #selector(hideAll))
    }
    
    @IBAction func loadingAction(_ sender: Any) {
        HUD.showLoading(in: view)
    }
    
    @IBAction func successAction(_ sender: Any) {
        HUD.showSuccess("成功")
    }
    
    @IBAction func failedAction(_ sender: Any) {
        HUD.showFailure("失败")
    }
    
    @IBAction func warningAction(_ sender: Any) {
        HUD.showWarning("警告")
    }
    
    @IBAction func msgBottomAction(_ sender: Any) {
        HUD.showMessage("msg")
    }
    
    @IBAction func msgCenterAction(_ sender: Any) {
        HUD.showMessage("msgmsgmsgmsgmsgmsgmsgmsgmsgmsgmsgmsgmsgmsg\nmsg", position: .center)
    }
    
    @objc func hideAll() {
        HUD.hide()
        HUD.hide(in: view)
    }
    
}
